package com.yootk.main;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.env.*;

import java.util.Map;
import java.util.Properties;

public class EnvironmentDemo {
    private static final Logger LOGGER = LoggerFactory.getLogger(EnvironmentDemo.class);
    public static void main(String[] args) {
        PropertyResolver resolver = new StandardEnvironment() ;
        LOGGER.info("【获取静态设置的JVM属性】JDK版本 = {}",
                resolver.getProperty("java.specification.version"));
        LOGGER.info("【获取动态设置的JVM属性】sun = {}", resolver.getProperty("sun"));
        LOGGER.info("【获取动态设置的JVM属性】xian = {}", resolver.getProperty("xian"));
    }
}